.class public Lcom/estrongs/io/archive/sevenzip/b;
.super Ljava/lang/Object;
.source "P7zipPluginDownloader.java"


# static fields
.field public static a:Ljava/lang/String; = "7zip"

.field public static b:Ljava/lang/String; = "zip"


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method private static a()Ljava/lang/String;
    .locals 3

    .line 35
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x15

    if-lt v0, v1, :cond_0

    const-string v0, "_pie"

    goto :goto_0

    :cond_0
    const-string v0, ""

    .line 36
    :goto_0
    invoke-static {}, Lcom/estrongs/fs/impl/local/j;->a()I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_1

    .line 37
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "p7za_arm"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_1

    :cond_1
    const/4 v2, 0x2

    if-ne v1, v2, :cond_2

    .line 38
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "p7za_x86"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_1

    :cond_2
    const/4 v2, 0x3

    if-ne v1, v2, :cond_3

    .line 39
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "p7za_mips"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 40
    :goto_1
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "http://dl-es.doglobal.net/7z/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_3
    const/4 v0, 0x0

    return-object v0
.end method

.method static synthetic a(Landroid/app/Activity;Ljava/lang/String;)V
    .locals 0

    .line 1
    invoke-static {p0, p1}, Lcom/estrongs/io/archive/sevenzip/b;->b(Landroid/app/Activity;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic a(Landroid/app/Activity;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Landroid/os/ConditionVariable;[ZLjava/lang/Runnable;ZLjava/lang/String;)V
    .locals 0

    .line 3
    invoke-static/range {p0 .. p8}, Lcom/estrongs/io/archive/sevenzip/b;->b(Landroid/app/Activity;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Landroid/os/ConditionVariable;[ZLjava/lang/Runnable;ZLjava/lang/String;)V

    return-void
.end method

.method static synthetic a(Ljava/lang/String;)V
    .locals 0

    .line 2
    invoke-static {p0}, Lcom/estrongs/io/archive/sevenzip/b;->b(Ljava/lang/String;)V

    return-void
.end method

.method public static declared-synchronized a(Ljava/lang/Runnable;Ljava/lang/String;)Z
    .locals 2

    const-class v0, Lcom/estrongs/io/archive/sevenzip/b;

    monitor-enter v0

    const/4 v1, 0x0

    .line 4
    :try_start_0
    invoke-static {p0, p1, v1}, Lcom/estrongs/io/archive/sevenzip/b;->a(Ljava/lang/Runnable;Ljava/lang/String;[Z)Z

    move-result p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return p0

    :catchall_0
    move-exception p0

    monitor-exit v0

    throw p0
.end method

.method public static declared-synchronized a(Ljava/lang/Runnable;Ljava/lang/String;[Z)Z
    .locals 20

    move-object/from16 v0, p0

    move-object/from16 v9, p1

    const-class v14, Lcom/estrongs/io/archive/sevenzip/b;

    monitor-enter v14

    .line 5
    :try_start_0
    invoke-static {}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->a1()Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v15
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    const/4 v13, 0x0

    if-nez v15, :cond_0

    .line 6
    monitor-exit v14

    return v13

    .line 7
    :cond_0
    :try_start_1
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    invoke-virtual {v1}, Landroid/app/Application;->getFilesDir()Ljava/io/File;

    move-result-object v1

    if-nez v1, :cond_1

    .line 8
    invoke-static {v15, v9}, Lcom/estrongs/io/archive/sevenzip/b;->b(Landroid/app/Activity;Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 9
    monitor-exit v14

    return v13

    .line 10
    :cond_1
    :try_start_2
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    invoke-virtual {v1}, Landroid/app/Application;->getFilesDir()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v8

    .line 11
    new-instance v5, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "/p7za"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v5, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 12
    invoke-static {}, Lcom/estrongs/io/archive/sevenzip/b;->a()Ljava/lang/String;

    move-result-object v7

    if-nez v7, :cond_2

    .line 13
    invoke-static {v15, v9}, Lcom/estrongs/io/archive/sevenzip/b;->b(Landroid/app/Activity;Ljava/lang/String;)V

    const-string v0, "url_fail"

    .line 14
    invoke-static {v0}, Lcom/estrongs/io/archive/sevenzip/b;->b(Ljava/lang/String;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 15
    monitor-exit v14

    return v13

    .line 16
    :cond_2
    :try_start_3
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v2, Lcom/estrongs/android/pop/b;->i:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v2, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {v7}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 17
    new-instance v6, Ljava/io/File;

    invoke-direct {v6, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const/4 v1, 0x1

    new-array v12, v1, [Z

    aput-boolean v1, v12, v13

    if-nez v0, :cond_3

    const/16 v16, 0x1

    goto :goto_0

    :cond_3
    const/16 v16, 0x0

    .line 18
    :goto_0
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_4

    invoke-virtual {v6}, Ljava/io/File;->exists()Z

    move-result v2

    if-eqz v2, :cond_4

    .line 19
    new-instance v2, Les/z60;

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v3

    new-instance v4, Lcom/estrongs/fs/impl/local/d;

    invoke-direct {v4, v6}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    new-instance v10, Lcom/estrongs/fs/impl/local/d;

    new-instance v11, Ljava/io/File;

    invoke-direct {v11, v8}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v10, v11}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    invoke-virtual {v5}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v11

    invoke-direct {v2, v3, v4, v10, v11}, Les/z60;-><init>(Lcom/estrongs/fs/f;Lcom/estrongs/fs/g;Lcom/estrongs/fs/g;Ljava/lang/String;)V

    .line 20
    new-instance v3, Lcom/estrongs/io/archive/sevenzip/b$a;

    invoke-direct {v3, v5, v12, v15, v9}, Lcom/estrongs/io/archive/sevenzip/b$a;-><init>(Ljava/io/File;[ZLandroid/app/Activity;Ljava/lang/String;)V

    invoke-virtual {v2, v3}, Les/s80;->a(Les/y80;)V

    .line 21
    invoke-virtual {v2, v13}, Les/s80;->b(Z)V

    .line 22
    aget-boolean v2, v12, v13

    if-nez v2, :cond_4

    .line 23
    aget-boolean v0, v12, v13
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    monitor-exit v14

    return v0

    :cond_4
    :try_start_4
    new-array v2, v1, [Z

    aput-boolean v13, v2, v13

    .line 24
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_5

    .line 25
    invoke-static {}, Lcom/estrongs/io/archive/sevenzip/a;->c()Z

    move-result v3

    aput-boolean v3, v2, v13

    .line 26
    :cond_5
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_8

    aget-boolean v3, v2, v13

    if-eqz v3, :cond_6

    goto :goto_1

    :cond_6
    if-eqz v0, :cond_7

    .line 27
    new-instance v2, Lcom/estrongs/io/archive/sevenzip/b$c;

    invoke-direct {v2, v0}, Lcom/estrongs/io/archive/sevenzip/b$c;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v15, v2}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 28
    :cond_7
    monitor-exit v14

    return v1

    .line 29
    :cond_8
    :goto_1
    :try_start_5
    new-instance v17, Landroid/os/ConditionVariable;

    invoke-direct/range {v17 .. v17}, Landroid/os/ConditionVariable;-><init>()V

    .line 30
    invoke-virtual {v6}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_a

    aget-boolean v1, v2, v13

    if-eqz v1, :cond_9

    goto :goto_2

    :cond_9
    move-object v1, v15

    move-object v2, v8

    move-object v3, v5

    move-object v4, v6

    move-object/from16 v5, v17

    move-object v6, v12

    move-object/from16 v7, p0

    move/from16 v8, v16

    move-object/from16 v9, p1

    .line 31
    invoke-static/range {v1 .. v9}, Lcom/estrongs/io/archive/sevenzip/b;->b(Landroid/app/Activity;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Landroid/os/ConditionVariable;[ZLjava/lang/Runnable;ZLjava/lang/String;)V

    move-object/from16 v18, v12

    const/16 v19, 0x0

    goto :goto_3

    .line 32
    :cond_a
    :goto_2
    new-instance v11, Lcom/estrongs/io/archive/sevenzip/b$b;

    move-object v1, v11

    move-object v3, v15

    move-object/from16 v4, p1

    move-object/from16 v9, v17

    move-object v10, v12

    move-object v0, v11

    move-object/from16 v11, p0

    move-object/from16 v18, v12

    move/from16 v12, v16

    const/16 v19, 0x0

    move-object/from16 v13, p2

    invoke-direct/range {v1 .. v13}, Lcom/estrongs/io/archive/sevenzip/b$b;-><init>([ZLandroid/app/Activity;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Landroid/os/ConditionVariable;[ZLjava/lang/Runnable;Z[Z)V

    invoke-virtual {v15, v0}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    :goto_3
    if-eqz v16, :cond_b

    .line 33
    invoke-virtual/range {v17 .. v17}, Landroid/os/ConditionVariable;->block()V

    .line 34
    :cond_b
    aget-boolean v0, v18, v19
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    monitor-exit v14

    return v0

    :catchall_0
    move-exception v0

    monitor-exit v14

    throw v0
.end method

.method private static b(Landroid/app/Activity;Ljava/lang/String;)V
    .locals 3

    const/4 v0, 0x1

    new-array v1, v0, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p1, v1, v2

    const p1, 0x7f110324

    .line 1
    invoke-virtual {p0, p1, v1}, Landroid/app/Activity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    return-void
.end method

.method private static b(Landroid/app/Activity;Ljava/lang/String;Ljava/io/File;Ljava/io/File;Landroid/os/ConditionVariable;[ZLjava/lang/Runnable;ZLjava/lang/String;)V
    .locals 13

    .line 2
    new-instance v0, Les/z60;

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v1

    new-instance v2, Lcom/estrongs/fs/impl/local/d;

    move-object/from16 v3, p3

    invoke-direct {v2, v3}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    new-instance v3, Lcom/estrongs/fs/impl/local/d;

    new-instance v4, Ljava/io/File;

    move-object v5, p1

    invoke-direct {v4, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v3, v4}, Lcom/estrongs/fs/impl/local/d;-><init>(Ljava/io/File;)V

    invoke-virtual {p2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v0, v1, v2, v3, v4}, Les/z60;-><init>(Lcom/estrongs/fs/f;Lcom/estrongs/fs/g;Lcom/estrongs/fs/g;Ljava/lang/String;)V

    .line 3
    new-instance v1, Lcom/estrongs/io/archive/sevenzip/b$d;

    move-object v5, v1

    move-object v6, p2

    move-object/from16 v7, p5

    move-object v8, p0

    move-object/from16 v9, p8

    move/from16 v10, p7

    move-object/from16 v11, p4

    move-object/from16 v12, p6

    invoke-direct/range {v5 .. v12}, Lcom/estrongs/io/archive/sevenzip/b$d;-><init>(Ljava/io/File;[ZLandroid/app/Activity;Ljava/lang/String;ZLandroid/os/ConditionVariable;Ljava/lang/Runnable;)V

    invoke-virtual {v0, v1}, Les/s80;->a(Les/y80;)V

    .line 4
    invoke-virtual {v0}, Les/s80;->d()V

    return-void
.end method

.method private static b(Ljava/lang/String;)V
    .locals 3

    .line 5
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v1, "type"

    const-string v2, "7zip"

    .line 6
    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v1, "result"

    .line 7
    invoke-virtual {v0, v1, p0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 8
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object p0

    const-string v1, "plug_down"

    invoke-virtual {p0, v1, v0}, Lcom/estrongs/android/statistics/b;->c(Ljava/lang/String;Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p0

    .line 9
    invoke-virtual {p0}, Lorg/json/JSONException;->printStackTrace()V

    :goto_0
    return-void
.end method
